package com.qjq.glasses_shopping.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.qjq.glasses_shopping.pojo.Admin;
import com.qjq.glasses_shopping.pojo.Permission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
@Mapper
public interface AdminMapper extends BaseMapper<Admin> {
    //删除全部角色
    void deleteAdminAllRole(Long aid);
    //根据id查找角色的全部信息
    Admin findById(Long id);
    //给管理员添加角色
    void addRoleToAdmin(@Param("aid") Long aid, @Param("rid") Long rid);
    //根据用户名查找所有的权限
    List<Permission> findAllPermission(String username);

}
